package com.huoyun.car.bean;

import java.util.Date;

public class Driver {
	private long id;
	private long userId;

	private String name;
	private String idCardNumber;
	private String gender;
	private String nation;
	private Date birthDate;
	private String birthDateStr;
	
	private String province;
	private String city;
	private String town;
	private String address;
	
	private String issuingAuthority;
	private Date idCardEffectiveEndDate;

	private String drivingLicenseCarType;
	private String drivingLicenseNumber;
	
	private Date drivingLicenseEffectiveStartDate;
	private int drivingLicenseEffectivePeriod;
	private String telephone;
	private String mobilePhone;
	
	private String rate;
	private long count;
	
	private int status;

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public long getUserId() {
		return userId;
	}

	public void setUserId(long userId) {
		this.userId = userId;
	}
	
	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	public String getMobilePhone() {
		return mobilePhone;
	}

	public void setMobilePhone(String mobilePhone) {
		this.mobilePhone = mobilePhone;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getIdCardNumber() {
		return idCardNumber;
	}

	public void setIdCardNumber(String idCardNumber) {
		this.idCardNumber = idCardNumber;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public String getNation() {
		return nation;
	}

	public void setNation(String nation) {
		this.nation = nation;
	}

	public Date getBirthDate() {
		return birthDate;
	}

	public void setBirthDate(Date birthDate) {
		this.birthDate = birthDate;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getTown() {
		return town;
	}

	public void setTown(String town) {
		this.town = town;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getIssuingAuthority() {
		return issuingAuthority;
	}

	public void setIssuingAuthority(String issuingAuthority) {
		this.issuingAuthority = issuingAuthority;
	}

	public String getRate() {
		return rate;
	}

	public void setRate(String rate) {
		this.rate = rate;
	}

	public long getCount() {
		return count;
	}

	public void setCount(long count) {
		this.count = count;
	}

	public Date getIdCardEffectiveEndDate() {
		return idCardEffectiveEndDate;
	}

	public void setIdCardEffectiveEndDate(Date idCardEffectiveEndDate) {
		this.idCardEffectiveEndDate = idCardEffectiveEndDate;
	}

	public String getDrivingLicenseCarType() {
		return drivingLicenseCarType;
	}

	public void setDrivingLicenseCarType(String drivingLicenseCarType) {
		this.drivingLicenseCarType = drivingLicenseCarType;
	}

	public String getDrivingLicenseNumber() {
		return drivingLicenseNumber;
	}

	public void setDrivingLicenseNumber(String drivingLicenseNumber) {
		this.drivingLicenseNumber = drivingLicenseNumber;
	}

	public Date getDrivingLicenseEffectiveStartDate() {
		return drivingLicenseEffectiveStartDate;
	}

	public void setDrivingLicenseEffectiveStartDate(
			Date drivingLicenseEffectiveStartDate) {
		this.drivingLicenseEffectiveStartDate = drivingLicenseEffectiveStartDate;
	}

	public int getDrivingLicenseEffectivePeriod() {
		return drivingLicenseEffectivePeriod;
	}

	public void setDrivingLicenseEffectivePeriod(
			int drivingLicenseEffectivePeriod) {
		this.drivingLicenseEffectivePeriod = drivingLicenseEffectivePeriod;
	}
	
	public void setDrivingLicenseEffectivePeriod(
			String drivingLicenseEffectivePeriod) {
		try{
			this.drivingLicenseEffectivePeriod = Integer.parseInt(drivingLicenseEffectivePeriod);
		}catch(Exception ex)
		{
			this.drivingLicenseEffectivePeriod = 0;
		}
	}
	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public String getBirthDateStr() {
		return new java.text.SimpleDateFormat("yyyy-MM-dd").format(birthDate);
	}

	public void setBirthDateStr(String birthDateStr) {
		this.birthDateStr = birthDateStr;
	}
}
